package com.acme.domain.account;

import com.acme.exceptions.NotEnoughFundsException;

public class SavingsAccount extends AbstractAccount{
	

	public SavingsAccount(final double amount) {
		super(amount);
	}

	public void withdraw(final double amount) throws NotEnoughFundsException{
		if (this.balance < amount){
			throw new NotEnoughFundsException();
		}
			
		this.balance -= amount;
	}

	public double getBalance() {
		return balance;
	}
	public void setBalance(final double balance) {
		this.balance = balance;
	}
	
	public double getOverdraft() {
		return 0;
	}
	
	public double maximumAmountToWithdraw() {
		return this.balance;
	}

	public String shortAccType() {
		return "s";
	}

	

}
